package com.qumap.item.test.iteminfo.item2;

import com.google.gwt.core.client.GWT;
import com.qumap.item.content.ObjectOnMap;
import com.qumap.item.content.ObjectOnMapShort;
import com.qumap.item.IITemInfoDisplay;
import com.qumap.item.request.ItemFilterAndLoadProcessor;
import com.qumap.item.info.ImageContainer;
import com.qumap.edititem.update.IItemUpdateProcessorAsync;
import com.qumap.item.test.iteminfo.TestEditItemInfo;
import com.qumap.item.test.iteminfo.item2.info.T2InfoDisplay;
import com.qumap.item.test.iteminfo.item2.load.LoadFilterProcessor;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 17.05.11
 * Time: 18:35
 * To change this template use File | Settings | File Templates.
 */
public class TItem2 extends TestEditItemInfo {

	public static final String TYPE = "ObjectOnMap";

    private final IItemUpdateProcessorAsync update_processor = GWT.create(Ttem2UpdateProcessor.class);
    private final ItemFilterAndLoadProcessor filter_display = new LoadFilterProcessor();

    private final ImageContainer image_container = new ImageContainer();

    private final IITemInfoDisplay info_display = new T2InfoDisplay();


	public TItem2() {
		type = TYPE;
        image_container.getIconInfo().setImageURL("/recources/iconb.png");
        image_container.getShadowInfo().setImageURL("/recources/shadow-icong.PNG");
	}

    @Override
    public ImageContainer getContainerByContent(ObjectOnMapShort content) {
        return image_container;
    }


    @Override
    public ItemFilterAndLoadProcessor getFilterDisplay() {
        return filter_display;
    }

    @Override
    public ObjectOnMapShort createContent() {
        return new ObjectOnMap();
    }

    @Override
    public IITemInfoDisplay getItemDisplay() {
        return info_display;
    }

    @Override
    public IItemUpdateProcessorAsync getItemChanger() {
        return update_processor;
    }
}
